
package com.abcijkxyz.controller.gtvg;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.abcijkxyz.domain.gtvg.Product;
import com.abcijkxyz.service.gtvg.ProductService;

@Controller
@RequestMapping(value = "/product/comments")
public class ProductCommentsController implements IGTVGController {

	public String process(final HttpServletRequest request, final HttpServletResponse response, Model model) throws Exception {

		final Integer prodId = Integer.valueOf(request.getParameter("prodId"));

		final ProductService productService = new ProductService();
		final Product product = productService.findById(prodId);

		model.addAttribute("prod", product);

		return "product/comments";
	}

}
